package com.lxl.bt.activity;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.widget.Toolbar;

import com.lxl.bt.R;
import com.lxl.bt.activity.BaseActivity;
import com.lxl.bt.bean.NotifyBody;
import com.lxl.bt.util.ACache;
import com.lxl.bt.util.TimeUtil;
import com.yanzhenjie.sofia.Sofia;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Create by lvxinlong
 * on  消息详情
 * on  2020年12月5日09:48:35
 **/
public class MessageInfoActivity extends BaseActivity {


    @BindView(R.id.rlBack)
    RelativeLayout rlBack;
    @BindView(R.id.txt_toolbar_title)
    TextView txtToolbarTitle;
    @BindView(R.id.toolbar)
    Toolbar toolbar;
    @BindView(R.id.tvTitle)
    TextView tvTitle;
    @BindView(R.id.tvContent)
    TextView tvContent;
    @BindView(R.id.tvAutor)
    TextView tvAutor;
    @BindView(R.id.tvTime)
    TextView tvTime;
    private Context context;
    ACache aCache;
    NotifyBody.OaNotifyListBean notify;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_messageinfo);
        ButterKnife.bind(this);
        //状态栏全透明全屏显示页面，布局能够延伸到状态栏和导航栏下方
        Sofia.with(this)
                .invasionStatusBar()
                .statusBarLightFont()
//                .statusBarDarkFont()
                .statusBarBackgroundAlpha(0)
                .invasionNavigationBar()
                .navigationBarBackgroundAlpha(0);

        context = this;
        rlBack.setVisibility(View.VISIBLE);
        txtToolbarTitle.setText("消息详情");
        notify= (NotifyBody.OaNotifyListBean) getIntent().getSerializableExtra("data");
        aCache = ACache.get(this);
        tvTitle.setText(notify.getTitle());
        tvContent.setText(notify.getContent());
        tvTime.setText(TimeUtil.getFormattedDateString(notify.getUpdateDate() / 1000));

    }



    @OnClick(R.id.rlBack)
    public void onClick() {
        finish();
    }
}
